@import "../../assets/scss/core/base";

$radio-prefix-cls: #{$jigsaw-prefix}-radios;
$radio-option-prefix-cls: #{$jigsaw-prefix}-radio-option;

.#{$radio-prefix-cls}, .#{$radio-prefix-cls}-lite{
    @include inline-block();
    &.#{$radio-prefix-cls}-error {
        border: 1px solid $error-color;
    }
}

.#{$radio-option-prefix-cls} {
    @include inline-block();
    font-size: $font-size-base;
    margin-right: 10px;
    cursor: pointer;
    &.#{$radio-option-prefix-cls}-disabled {
        @include compatible(color, $disabled-color, $disabled-color-ie11);
        cursor: not-allowed;
        .#{$radio-option-prefix-cls}-inner {
            background: $disabled-bg;
            &:after {
                background-color: $disabled-color;
            }
            &.#{$radio-option-prefix-cls}-checked {
                border-color: $border-color-base;
            }
            &:hover {
                border-color: $border-color-base;
            }
        }
    }
    .#{$radio-option-prefix-cls}-inner {
        @include inline-block();
        position: relative;
        top: 0;
        left: 0;
        width: 14px;
        height: 14px;
        border: 1px solid $border-color-base;
        border-radius: 14px;
        background-color: $default-color;
        margin-right: 5px;
        @include prefixer(transition, all 0.3s);
        &:after {
            position: absolute;
            width: 6px;
            height: 6px;
            left: 3px;
            top: 3px;
            border-radius: 4px;
            display: table;
            border-top: 0;
            border-left: 0;
            content: ' ';
            background-color: $primary-color;
            opacity: 0;
            @include prefixer(transfrom, scale(0));
            @include prefixer(transition, all 0.3s $ease-in-out-circ);
        }
        &.#{$radio-option-prefix-cls}-checked {
            border-color: $primary-color;
            &:after {
                @include prefixer(transform, scale(1));
                @include prefixer(transition, all 0.3s $ease-in-out-circ);
                opacity: 1;
            }
        }
        &:hover {
            border-color: $primary-color;
        }
    }
    .#{$radio-option-prefix-cls}-content {
        @include inline-block();
    }
}





